package com.lyf.shop.dao;

import com.lyf.shop.entity.User;

import java.sql.SQLException;
import java.util.List;

public interface UserDao{
    //通过名字查询对象
    User findUserByUname(String username) throws SQLException;
    //新增
    int addUser(User user) throws SQLException;
    //通过邮箱和激活码进行用户的查询，用于激活
    User getUserByEmailAndCode(String email,String code) throws SQLException;
    //激活用户状态为1
    int updateUserStatus(int uid) throws SQLException;
    //
    List<User> userList() throws SQLException;
    List<User> userList(String uname,String usex) throws SQLException;
    //删除用户
    int deleteUser(int uid) throws SQLException;
}
